function loadSucUserList(){
	$("#userList").datagrid({
		fit:true,
		striped: true,//设置为true将交替显示行背景
		border:false, 
	    fitColumns: true,
	    loadMsg: "正在加载中。。。",
	    columns: [[
	               { field: 'lawerCode', title: '用户名', width: 120,align:'center' },
	               { field: 'lawerName', title: '律师姓名', width: 120,align:'center' },
	               { field: 'lawerCompany', title: '律师事务所', width: 120,align:'center' },
	               { field: 'lawerNo', title: '律师证编号', width: 120,align:'center' },
	               { field: 'lawerTel', title: '联系方式', width: 120,align:'center' },
	               { field: 'createDate', title: '注册时间', width: 120,align:'center' },
	               { field: 'lawerPhoto', title: '查看证件', width: 80,align:'center',formatter:function(value,row,index){
	 	         	    if(value && value!=""){
	 	         	    	 var v1="<a href=\"javascript:void(0)\" class=\"easyui-linkbutton l-btn l-btn-plain\" data-options=\"toggle:true\" " +
	 	 	      			" onclick=\"openImages('"+index+"')\"><span style=\"color:blue\" class=\"l-btn-left\"><span class=\"l-btn-text\">查看证件</span></span></a>"
	 	 	      	           return v1;
	 	         	    }
	 			  } },
	               { field: 'del', title: '删除', width: 40,align:'center',formatter:function(value,row,index){
	 	         	    var v1="<a href=\"javascript:void(0)\" class=\"easyui-linkbutton l-btn l-btn-plain\" data-options=\"toggle:true\" " +
	 	      			" onclick=\"delUser('"+index+"')\"><span style=\"color:blue\" class=\"l-btn-left\"><span class=\"l-btn-text\">删除</span></span></a>"
	 	      	           return v1;
	 	             
	 			  } },
	 			  { field: 'reset', title: '重置密码', width: 80,align:'center',formatter:function(value,row,index){
	 	         	   var v1="<a href=\"javascript:void(0)\" class=\"easyui-linkbutton l-btn l-btn-plain\" data-options=\"toggle:true\" " +
	 	      			" onclick=\"ReSetUserPwd('"+index+"')\"><span style=\"color:blue\" class=\"l-btn-left\"><span class=\"l-btn-text\">重置密码</span></span></a>"
	 	      	       return v1;
	 			  } }
	           ]],
	           rownumbers: false, //行号    
	           singleSelect: true, //是否单选
	           pagination: true,//分页控件
	           pageSize:20,
	           onLoadSuccess:onLoadSuccess
	});
	queryUser(1,20);
	$(".panel-tool").hide();
}
//打开图片
function openImages(index){
	var row =  $("#userList").datagrid("selectRow",index).datagrid("getSelected");
	var url = "../upload/"+row.lawerPhoto;
	var diyColumnWindow = {
    		id: 'imagesWindow',
    		width: 700,
    		height: 500,
    		title: '查看律师证件照窗口',
    		url: 'images.jsp',
    		collapsible: false,
    		minimizable: false,
    		maximizable: false,
    		resizable: false,
    		closable: false,
    		param: {url:url}
    };
    OpenNewWindow(diyColumnWindow);
}
//重置后查询所有
function queryUserAll(){
	$("#userPageForm").form("clear");
	queryUser(1,20);
}
//查询申请管理列表
function queryUser(pageNum,pageSize){
	var url = 'LoadUser';
	var form = $("#userPageForm"); 
	var param = form.serialize();
	param += "&pageNum="+pageNum+"&pageSize="+pageSize;
	loadDataGirdJson(url,param,'#userList');
}
//删除用户
function delUser(index){
	var row =  $("#userList").datagrid("selectRow",index).datagrid("getSelected");
	$.post("DeleteUser", {"lawerCode":row.lawerCode}, function(text) {
		var data = (new Function("return "+text))();
		alert(data.status);
		if(data.status=='删除成功'){
			$("#userList").datagrid("deleteRow",index);
		}
	});
}
//重置密码
function ReSetUserPwd(index){
	var row =  $("#userList").datagrid("selectRow",index).datagrid("getSelected");
	$.post("ReSetUserPwd", {"lawerCode":row.lawerCode}, function(text) {
		var data = (new Function("return "+text))();
		alert(data.status);
	});
}